package com.xiaotu.factory.absfactory.pizzastore.pizza;

/**
 * @author 张晓
 * @create 2020-06-19 10:10
 */
//将Pizza 类做成抽象的
public abstract class Pizza {

    //名字
    protected String name;

    //准备原材料，不同的披萨不一样，因此，我们做成抽象方法
    public abstract void prepare();


    //烘烤
    public void bake(){
        System.out.println(name + " baking; ");
    }

    //切割
    public void cut(){
        System.out.println(name + " cutting; ");
    }

    //打包
    public void box(){
        System.out.println(name + " boxing; ");
    }

    //设置名字
    public void setName(String name){
        this.name = name;
    }

}
